<%--
  Created by IntelliJ IDEA.
  User: wujia
  Date: 2017/7/19
  Time: 18:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<body>
<head>
    <link rel="stylesheet" href="../../static/common/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/css/global.css">
    <link rel="stylesheet" href="../../static/css/table.css">
    <script src="../../static/common/axios.min.js"></script>
    <script src="../../static/common/vue.min.js"></script>
    <script src="../../static/common/layui/layui.js"></script>
</head>

<div style="margin: 15px;" id="Vue" v-cloak>

    <div v-show="show">
        <blockquote class="layui-elem-quote">
            <form action="" method="post" class="layui-form">
                <div class="layui-form-item">
                    <a href="javascript:;" class="layui-btn" @click="add" style="float: left;margin-right: 50px;">
                        <i class="layui-icon">&#xe608;</i> 添加
                    </a>
                    <div class="layui-input-inline">
                        <select class="layui-input" id="state" name="state" lay-filter="state" lay-search>
                            <option value="">审核状态</option>
                            <option value="2">待审核</option>
                            <option value="3">审核通过</option>
                            <option value="4">审核不通过</option>
                        </select>
                    </div>
                    <input type="button" class="layui-btn" @click="selectState" value="筛选">
                    <button type="reset" class="layui-btn" value="重置" @click="reset">重置</button>
                </div>
            </form>
        </blockquote>
        <fieldset class="layui-elem-field">
            <legend>企业信息</legend>
            <div class="layui-field-box layui-form">
                <table class="layui-table admin-table">
                    <thead>
                    <tr>
                        <th>企业全称</th>
                        <th>地址</th>
                        <th>联系人</th>
                        <th>联系电话</th>
                        <th>审核状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <%--内容容器--%>
                    <tbody id="content">
                    </tbody>
                </table>
            </div>
        </fieldset>

        <%--分页容器--%>
        <div class="admin-table-page">
            <div id="paged" class="page">
            </div>
        </div>
    </div>
</div>
<!--模板-->
<script type="text/html" id="tpl">
    {{# layui.each(d.data, function(index, item){ }}
    <tr>
        <td>{{ item.fullname || "-" }}</td>
        <td>{{ item.addr || "-"}}</td>
        <td>{{ item.contactor || "-"}}</td>
        <td>{{ item.phone || "-"}}</td>

        {{# if(item.state == 1){ }}
        <td> 暂存</td>
        {{# }; }}
        {{# if(item.state == 2){ }}
        <td> 待审核</td>
        {{# }; }}
        {{# if(item.state == 3){ }}
        <td>审核通过</td>
        {{# }; }}
        {{# if(item.state == 4){ }}
        <td>审核不通过</td>
        {{# }; }}
        {{# if(item.state !=1 &&item.state !=2&&item.state !=3&&item.state != 4){ }}
        <td>-</td>
        {{# }; }}


            {{# if(item.state == 1||item.state == 2){ }}
        <td><a href="javascript:;" target="_self" data-id="{{item.id}}" data-opt="more"
               class="layui-btn layui-btn-normal layui-btn-mini" style="background-color: #009688;">审核</a></td>
            {{# }; }}
            {{# if(item.state == 3||item.state == 4){ }}
        <td><a href="javascript:;" target="_self" data-id="{{item.id}}" data-opt="more"
               class="layui-btn layui-btn-normal layui-btn-mini">查看详情</a></td>
            {{# }; }}
            {{# if(item.state !=2 &&item.state !=3&&item.state !=4&&item.state !=1){ }}
        <td>-</td>
            {{# }; }}
    </tr>
    {{# }); }}
</script>
<script>
    var publisherid = ${sessionScope.currentUser.getId()};
</script>
<script src="../../static/js/admin/orgList.js"></script>
</body>
</html>
